package com.test.moredatesouce.modules.other.db1.service.impl;

import com.test.moredatesouce.modules.other.db1.entity.User;
import com.test.moredatesouce.modules.other.db1.mapper.UserMapper;
import com.test.moredatesouce.modules.other.db1.service.UserService;
import com.test.moredatesouce.modules.other.db2.entity.City;
import com.test.moredatesouce.modules.other.db2.mapper.CityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author:ZhouYang
 * @Description:
 * @Date: Created in 2019/9/2 14:16
 * @Modified By：
 */
@Service
public class UserServiceImpl implements UserService {

   @Autowired
    UserMapper userMapper;

   @Autowired
    CityMapper cityMapper;


    @Override
    public void cp() {
        User user = userMapper.selectByPrimaryKey(1);
        City city = cityMapper.selectByPrimaryKey(1);
        System.out.println(user +" -- " + city);
    }
}
